package com.japstudy.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.japstudy.dao.IGradeDao;
import com.japstudy.entity.Grade;
import com.japstudy.service.IGradeService;

@Service
public class GradeServiceImpl implements IGradeService{
	
	@Autowired
	private IGradeDao iGradeDao;

	@Override
	public int add(Grade grade) {
		return iGradeDao.add(grade);
	}

	@Override
	public int delete(Grade grade) {
		return iGradeDao.delete(grade);
	}

	@Override
	public int update(Grade grade) {
		return iGradeDao.update(grade);
	}

	@Override
	public Grade selectById(String gradeId) {
		return iGradeDao.selectById(gradeId);
	}

	@Override
	public List<Grade> selectAll() {
		return iGradeDao.selectAll();
	}

	@Override
	public Grade selectByGradeName(Grade grade) {
		return iGradeDao.selectByGradeName(grade);
	}

	@Override
	public List<Grade> selectByNameLike(String gradeName) {
		return iGradeDao.selectByNameLike(gradeName);
	}

	@Override
	public List<Grade> haveWordGrade() {
		return iGradeDao.haveWordGrade();
	}
}
